package com.jh.fcsm.common;

import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

import java.io.IOException;

public class JSONObjectFWBXssDeserializer extends JsonDeserializer<JSONObject> {

	@Override
	public JSONObject deserialize(JsonParser p, DeserializationContext ctxt)
			throws IOException, JsonProcessingException {
		ctxt.setAttribute("cuType", "no");
		JSONObject o= ctxt.readValue(p, JSONObject.class);
		ctxt.setAttribute("cuType", "");
		return o;
	}
    
}